<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事业单位招考</title>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <!--<link rel="stylesheet" href="../../plugins/viewer-master/viewer.css">-->

    <link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="../../css/excutive_housekeeper/statistical_detail.css" />
    <script src="../../js/statistics.js"></script>
    <style>
        #share{
            float: right;
            width: auto;
            height: 100%;
            padding: 6px 11px;
        }
        #share img{
            width: 20px;
            padding-top: 40%;
        }
           /*页面溢出隐藏设置*/
       #main{
       	overflow: hidden;
       }
        /*图片显示*/
        #big_img{
            width: 100%;
            height: 100vh;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 999;
            overflow: scroll;
            background: rgba(0,0,0,0.5);
            /*display: flex;*/
            /*flex-direction: column;*/
            /*justify-content: center;*/
        }
        #big_img .img_box{
            position: relative;
            width: 100%;
            /*修改备注*/
            /*margin-top:20%;*/
            height:100vh;
            -webkit-user-drag: none;-moz-user-drag: none;-o-user-drag: none;user-drag: none;

        }
        #big_img .img_box img{
            width: 100%;
            -webkit-user-drag: none;-moz-user-drag: none;-o-user-drag: none;user-drag: none;
            position: absolute;
            top:50%;
            left:50%;
            transform: translate(-50%,-50%);
            -webkit-transform: translate(-50%,-50%);
        }
        .mui-preview-image.mui-fullscreen {
			position: fixed;
			z-index: 20;
			background-color: #000;
		}
		.mui-preview-header,
		.mui-preview-footer {
			position: absolute;
			width: 100%;
			left: 0;
			z-index: 10;
		}
		.mui-preview-header {
			height: 44px;
			top: 0;
		}
		.mui-preview-footer {
			height: 50px;
			bottom: 0px;
		}
		.mui-preview-header .mui-preview-indicator {
			display: block;
			line-height: 25px;
			color: #fff;
			text-align: center;
			margin: 15px auto 4px;
			width: 70px;
			background-color: rgba(0, 0, 0, 0.4);
			border-radius: 12px;
			font-size: 16px;
		}
		.mui-preview-image {
			display: none;
			-webkit-animation-duration: 0.5s;
			animation-duration: 0.5s;
			-webkit-animation-fill-mode: both;
			animation-fill-mode: both;
		}
		.mui-preview-image.mui-preview-in {
			-webkit-animation-name: fadeIn;
			animation-name: fadeIn;
		}
		.mui-preview-image.mui-preview-out {
			background: none;
			-webkit-animation-name: fadeOut;
			animation-name: fadeOut;
		}
		.mui-preview-image.mui-preview-out .mui-preview-header,
		.mui-preview-image.mui-preview-out .mui-preview-footer {
			display: none;
		}
		.mui-zoom-scroller {
			position: absolute;
			display: -webkit-box;
			display: -webkit-flex;
			display: flex;
			-webkit-box-align: center;
			-webkit-align-items: center;
			align-items: center;
			-webkit-box-pack: center;
			-webkit-justify-content: center;
			justify-content: center;
			left: 0;
			right: 0;
			bottom: 0;
			top: 0;
			width: 100%;
			height: 100%;
			margin: 0;
			-webkit-backface-visibility: hidden;
		}
		.mui-zoom {
			-webkit-transform-style: preserve-3d;
			transform-style: preserve-3d;
		}
		.mui-slider .mui-slider-group .mui-slider-item img {
			width: auto;
			height: auto;
			max-width: 100%;
			max-height: 100%;
		}
		.mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
			width: 100%;
		}
		.mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
			display: inline-table;
		}
		.mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
			display: table-cell;
			vertical-align: middle;
		}
		.mui-preview-loading {
			position: absolute;
			width: 100%;
			height: 100%;
			top: 0;
			left: 0;
			display: none;
		}
		.mui-preview-loading.mui-active {
			display: block;
		}
		.mui-preview-loading .mui-spinner-white {
			position: absolute;
			top: 50%;
			left: 50%;
			margin-left: -25px;
			margin-top: -25px;
			height: 50px;
			width: 50px;
		}
		.mui-preview-image img.mui-transitioning {
			-webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
			transition: transform 0.5s ease, opacity 0.5s ease;
		}
		@-webkit-keyframes fadeIn {
			0% {
				opacity: 0;
			}
			100% {
				opacity: 1;
			}
		}
		@keyframes fadeIn {
			0% {
				opacity: 0;
			}
			100% {
				opacity: 1;
			}
		}
		@-webkit-keyframes fadeOut {
			0% {
				opacity: 1;
			}
			100% {
				opacity: 0;
			}
		}
		@keyframes fadeOut {
			0% {
				opacity: 1;
			}
			100% {
				opacity: 0;
			}
		}
    </style>
</head>
<body>
<header class="mui-bar mui-bar-nav header">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">事业单位招考</h1>
    <span id='share'>
    	<img src="../../images/icon/news_list/share.png" alt="" />
    </span>
</header>
<div id="main">
    <!--<h3 class="title_header" style="margin-top:49px;">2010年溧阳市国民经济和社会发展统计公报</h3>
    <div class="date" style="border-bottom:1px solid #f5f5f5;">
        <span>2011-03-08</span>
        <span>溧阳统计局</span>
    </div>
    <div class="s_main">

    </div>-->
</div>

<script type="text/javascript" src='../../plugins/jquery/jquery-3.1.0.min.js'></script>
<script src="../../plugins/mui/mui.min.js"></script>
<script src="../../plugins/mui/mui.zoom.js" ></script>
<script src="../../plugins/mui/mui.previewimage.js" ></script>
<script src="../../js/getApiToken.js"></script>
<script src="../../js/md5.js"></script>
<script src='../../js/fontset.js'></script>
<script src="../../js/executive_housekeeper/insititution_detail.js"></script>
<script>
	mui.init({
        //******设置时间监听类型******
        gestureConfig:{
            tap: true, //默认为true
//            doubletap: true, //默认为false
            longtap: true, //默认为false
//            swipe: true, //默认为true
//            drag: true, //默认为true
//            hold:false,//默认为false，不监听
//            release:false//默认为false，不监听
        }
    });
    var sharehrefDes,
            sharehrefTitle,//微信主要内容
            sharehrefID;//微信所需的链接id
	mui.plusReady(function(){
        var article_id=plus.webview.currentWebview().detail_id;//列表id
        sharehrefID=article_id;//ID
        console.log(article_id);
		mui.previewImage();

		//数据交互
        myAjax(
            'home/recruit/getGovernmentDetail','get',{'id':article_id},
            function(data){
               console.log(JSON.stringify(data));
               if(data.success){
	               	var html='';
	               html=
	               		'<h3 class="title_header" style="margin-top:49px;">'+data.title+'</h3>'+
					    '<div class="date" style="border-bottom:1px solid #f5f5f5;">'+
					        '<span>'+data.time+'</span>'+
					        '<span style="padding-left:5px;">'+data.publisher+'</span>'+
					    '</div>'+
					    '<div class="s_main">'+
							data.content
					    +'</div>';
                   console.log(data.content);
					$('#main').append(html);
                   //标题头、详情
                   sharehrefDes=$('.s_main').text();
                   sharehrefTitle=$('.title_header').text();
                   //调用
                   saveImg();
               }
                
            }
     	);


        //图片显示处理
        //遍历图片
        function saveImg(){
            $('#main').find('.s_main img').each(function (e) {
                $(this).css({
                    'width': '100%',
                    'height': 'auto'
                });
                $(this).attr({
                	'data-preview-src':"",
                	'data-preview-group':"1"
                })
                $(this).on('longtap', function (e) {
//          console.log($(this).text())
//                    console.log($(this));
//                    console.log($(this).attr("src"));

                    var uploadSrc = $(this).attr("src"),
                            nameArray = uploadSrc.split('/'),
                            name = nameArray[nameArray.length - 1],
                            fileSrc;
                    mui.confirm('是否保存该图片？', '提示', ['确定', '取消'], function (value) {
                        if (value.index == 0) {
                            if (plus.device.name == 'iOS') {
                                fileSrc = '_doc/' + name;
                            } else {
                                fileSrc = '_downloads/image' + name;
                            }
                            var myUpload = plus.downloader.createDownload(uploadSrc, {
                                method: 'get',
                                filename: fileSrc
                            }, function (download, status) {
                                var filename = download.filename;
                                plus.gallery.save(filename, function () {
                                    mui.alert('保存图片成功！');
                                })
                            })
                            myUpload.start();
                        }

                    })
                })

            })
        }
	})
</script>

</body>
</html>